package com.xbstar.datafusion.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

/**
 * Created by jiwenfei on 2018/1/31 9:30 .
 */
@Service
public class KafakaServivce {
    @Autowired
    private KafkaTemplate<String, String> kafkaTemplate;
    public void send(String topic ,String payload) {
        kafkaTemplate.send(topic, "ddss",payload);
        kafkaTemplate.flush();
    }
}
